﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using NetDon.OA.Data.HelperClasses;

namespace NetDon.OA.Interface
{
    [ServiceContract]
    public partial interface ISecurityManageService
    {
        #region Role Management
        [OperationContract]
        string GetRoleName(Guid roleId);

        [OperationContract]
        Guid AddRole( string roleName);

        [OperationContract]
        Boolean ChangeRoleName(Guid roleId,  string roleName);

        [OperationContract]
        Boolean RemoveRole(Guid roleId);

        [OperationContract]
        RoleInfo[] GetRoles();

        #endregion

        #region Permission Management
        [OperationContract]
        ModuleCollection GetAllModules();

        [OperationContract]
        string[] GetRolePermission(Guid roleId);

        [OperationContract]
        Boolean SavePermission( Guid roleId, string[] permissions, Transaction tran);
        #endregion
    }
}
